#ifndef _IUARPTABLE_HPP_
#define _IUARPTABLE_HPP_

#include "iuARPEntry.hpp"

#define MAX_ENTRIES 100

class iuIPAddress;
class iuInterface;

/**
 * @brief Table ARP servant a stocker les derniers resultats des requetes ARP
 */
class iuARPTable
{
public:
   iuARPTable();
   ~iuARPTable();

   void        addEntry(iuARPEntry *newEntry);
   iuARPEntry *search(const iuIPAddress &ip, const iuInterface *interface);
   void        removeEntriesByInterface(const iuInterface *in);

   void        print() const;

private:
   void        promoteEntry(iuARPEntry *entry);

   iuARPEntry *m_entries;
   iuARPEntry *m_last;
   int m_cpt;
};

#endif
